package com.jc.order.constant;

public enum DataStatusEnum {

    //1.待受理，20.申请中，40.通过，30.已拒绝
    DATA_STATUS_1("1", "待受理"),
    DATA_STATUS_APPLYING("20", "申请中"),
    DATA_STATUS_REFUSE("30", "已拒绝"),
    DATA_STATUS_PASS("40", "通过");


    private final String code;
    private final String name;

    DataStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static DataStatusEnum getByCode(String code) {
        for (DataStatusEnum item : DataStatusEnum.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}
